package tech.aistar.day05.exercise;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2022/7/22 2:28 下午
 */
public class ShapeTest {
    public static void main(String[] args) {
        Shape[] shapes = new Shape[3];
        Shape r = new Rect(5,10);
        Shape s = new Square(10);
        Shape c = new Circle(10.0d);

        shapes[0] = r;
        shapes[1] = s;
        shapes[2] = c;

        for (Shape shape : shapes) {
            System.out.println(shape.area());
            System.out.println(shape.girth());
            System.out.println("===");
        }
    }
}
